package com.ktsmartcar.commons.controller;

import javax.servlet.http.HttpServletRequest;	
import javax.servlet.http.HttpServletResponse;

import org.springframework.validation.BindException;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractCommandController;

public class CommonsAbstractCommandController extends AbstractCommandController {
	
	private String viewName = null;

	public void setViewName(String viewName) {
		this.viewName = viewName;
		System.out.println(this.viewName);
	}
	

	@Override
	protected ModelAndView handle(HttpServletRequest arg0,
			HttpServletResponse arg1, Object arg2, BindException arg3)
			throws Exception {
		// TODO Auto-generated method stub
		
		ModelAndView mnv = new ModelAndView();
		mnv.setViewName(this.viewName);
		
		return mnv;
	}

}
